package com.v.im.businessservice.controller;

import com.v.im.businessapi.api.ImChatGroupServiceAPI;
import com.v.im.businessapi.api.ImMessageServiceAPI;
import com.v.im.businessapi.dto.paramDTO.ImMessageParamDTO;
import com.v.im.businessapi.dto.resultDTO.ImChatGroupResultDTO;
import com.v.im.businessservice.bean.ImMessageEntity;
import com.v.im.businessservice.controller.base.BaseController;
import io.swagger.annotations.Api;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wym
 * @create 2019-01-30 11:00
 **/
@Api(value = "聊天信息", description = "聊天信息增、删、查、改", tags = "im-message")
@RestController
public class ImMessageController extends BaseController implements ImMessageServiceAPI {

    @Override
    public void saveImMessageInfo(ImMessageParamDTO imMessageParamDTO) {
        if (imMessageParamDTO != null) {
            ImMessageEntity imMessageEntity = new ImMessageEntity();
            BeanUtils.copyProperties(imMessageParamDTO, imMessageEntity);
            imMessageService.saveImMessage(imMessageEntity);
        }
    }
}
